package ar.edu.itba.it.pdc.nio;

import java.io.IOException;
import java.util.List;

public class ProtocolThread extends Thread{
	
	TCPProtocol protocol;
	List<Integer> ports;
	
	public ProtocolThread(List<Integer> ports, TCPProtocol protocol) {
		this.protocol = protocol;
		this.ports = ports;
	}
	
	@Override
	public void run() {
		try {
			run(ports, protocol);
		} catch (IOException e) {
			e.printStackTrace();
		}
	}
	
	
	public void run(List<Integer> ports, TCPProtocol protocol) throws IOException {
		ProtocolRunner protocolRunner = new ProtocolRunner();
		
		protocolRunner.run(ports, protocol);
	}
}
